﻿@model ProductDetailsModel
@using Nop.Web.Models.Catalog;
@if (Model.DisplayBackInStockSubscription)
{
    <div class="back-in-stock-subscription">
        
            //use fancybox to how nice pop-up
            Html.AddScriptParts("~/Scripts/jquery.fancybox-1.3.4.pack.js");
            Html.AddCssFileParts("~/Content/fancybox/jquery.fancybox-1.3.4.css");
        @*<input type="button" id="back-in-stock-subscribe-@Model.Id" class="button-1 subscribe-button btn btn-default" value="@T("BackInStockSubscriptions.NotifyMeWhenAvailable")" />*@
<input type="button" id="back-in-stock-subscribe-@Model.Id" class="button-1 subscribe-button btn btn-default" value="@T("BackInStockSubscriptions.NotifyMeWhenAvailable")" />
            <script type="text/javascript">
                $(document).ready(function () {
                    $("#back-in-stock-subscribe-@Model.Id").fancybox({
                        'href': '@Url.RouteUrl("BackInStockSubscribePopup", new { productId = Model.Id })',
                        'speedIn': 600,
                        'speedOut': 200,
                        'width': 450,
                        'height': 230,
                        'type': 'iframe',
                        'centerOnScroll': true
                    });
                });
        </script>
            
        
    </div>

}